<%@ page contentType="text/html; charset=utf-8" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<html>
<head>
<title>tree</title>
</head>
<link rel="StyleSheet" href="${webpath}/js/dtree.css" type="text/css" />
<script type="text/javascript" src="${webpath}/js/dtree.js"></script>
<body>
<table>
	<tr>
		<td align="left">
		<div class="dtree">
		<script type="text/javascript">
		<!--
		d = new dTree('d');
		<c:choose>
			<c:when test="${param.categry=='article'}">
				d.add(0,-1,'新闻管理','${webpath}/admin/news/news_leibie/ArticlesLeibie.do?action=findNewsLeibieTree&categry=article');
				d.add(-2,-1,'新闻类别管理','${webpath}/admin/news/news_leibie/ArticlesLeibie.do?action=newsLiebeiView','','mainFrame');
				<c:forEach var="articlesLeibieTree" items="${articlesLeibieTree}">
					d.add(${articlesLeibieTree.id},${articlesLeibieTree.fatherId},'${articlesLeibieTree.leibie}','${webpath}/admin/news/Articles.do?action=findNews&articlesleibieID=${articlesLeibieTree.id}','','mainFrame');
				</c:forEach>
			</c:when>
			<c:when test="${param.categry=='message'}">
				d.add(0,-1,'留言管理');
				d.add(1,0,'产品留言','${webpath}/admin/product/ProductMessage.do?action=findProductMessage','','mainFrame');
				d.add(2,0,'网站留言','${webpath}/admin/message/Message.do?action=findMessage','','mainFrame');
			</c:when>
			<c:when test="${param.categry=='product'}">
				d.add(0,-1,'产品管理','${webpath}/admin/product/product_leibie/ProductLeibie.do?action=findProductLeibieTree&categry=product');
				d.add(-2,-1,'产品类别管理','${webpath}/admin/product/product_leibie/ProductLeibie.do?action=findProductLeibie','','mainFrame');
				d.add(-3,-1,'产品属性管理','${webpath}/admin/product/product_leibie/ProductAtrribute.do?action=findProductAtrribute','','mainFrame');
				
				<c:forEach var="productLeibieTree" items="${productLeibieTree}">
					d.add(${productLeibieTree.id},${productLeibieTree.fatherId},'${productLeibieTree.leibie}','${webpath}/admin/product/Product.do?action=findProducts&productleibieID=${productLeibieTree.id}','','mainFrame');
				</c:forEach>
			</c:when>
			<c:when test="${param.categry=='friendlink'}">
				d.add(0,-1,'友情链接管理');
				d.add(1,0,'友情链接','${webpath}/admin/friendlink/FriendLink.do?action=findFriendLink','','mainFrame');
			</c:when>
			<c:otherwise>
			</c:otherwise>
		</c:choose>
		document.write(d);

		//-->
		</script>
		</div>
		</td>
	</tr>
	<!--<tr>
		<td><a href="product/product_list.jsp" target="mainFrame">≡ 产品管理 ≡</a></td>
	</tr>-->
</table>
</html>
